<!DOCTYPE html>
<!-- saved from url=(0089)http://m.biyao.com/account/registvc?mobile=15221744121&k=979436ECAFBC5231ED784775CF1410D1 -->
<html data-livestyle-extension="available"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="description" content="">
<meta name="Keywords" content="">
<meta http-equiv="Cache-Control" content="no-cache">
<meta content="email=no" name="format-detection">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta name="apple-touch-fullscreen" content="no"> 
<script type="text/javascript">window.ControllerSite='';window.mdomain='.biyao.com';window.version='';window.__pageType='other'</script>
<link rel="shortcut icon" href="https://static.biyao.com/m/img/favicon.ico">
<link href="css/base.css" rel="stylesheet">
<title>快速注册</title>
</head>
<body><input type="hidden" id="focusme" value="focus">
	<header>
	</header>
	<div class="by_w" id="by_w">
		<link href="css/login/login.css" rel="stylesheet">
		<link href="css/login/common.css" rel="stylesheet">
<div class="relative">
	<div class="m_pagetop" align="center">
		<span class="m_goback"></span><div align="center" class="m_title">快速注册</div><span class="m_menu none icon-more_m"></span>
	</div>
</div>
<div class="m_gnnav none"><a class="touri" touri="/index"><span class="m_a_p1"></span>首页</a><a class="touri" touri="/classify/classify"><span class="m_a_p4"></span>分类</a><a class="touri" touri="/cart/list.html"><span class="m_a_p2"></span>购物车</a><a class="touri" touri="/account/mine"><span class="m_a_p3"></span>我的必要</a></div>
<div class="m_wap waps" align="center" style="min-height: 568px;">
	<form class="loginBox" method="post">
		<div class="m_login_wreg" style="margin-top: 20%;">
			<div class="m_vcph">已将<span class="bold">短信验证码</span>发送至手机号<p id="m_mobile">+86 155 1555 1555</p></div>
			<input class="m_zc_vc bbox mg_b10" type="text" id="username" name="username" value="" placeholder="请输入验证码">
			<!-- <input type="button" class="m_sendvc_b bbox mg_b10" value="21秒后重发">
			<input type="button" class="m_sendvc_bre bbox mg_b10" id="revc" value="获取验证码"> -->
			<div class="yhts" align="left"></div>
			<input type="button" id="confirmvc" class="m_zc_b btn-black" value="下一步">
			<input type="button" class="m_zc_bre" value="下一步">
			<p class="voice" style="display:block;">总是收不到验证码？<span>点击这里</span></p>
		</div>
	</form>
</div>
<div class="m_f_bottomre none">
	<!-- <span class="col_666 f12">&copy 2015 BIYAO.COM 版权所有 粤ICP备13088531号</span> -->
	<span class="col_666 f12">触屏版&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;丨&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="downapp">客户端</a></span>
</div><script type="text/javascript" src="js/jquery.min.js"></script>
		<!-- <script type="text/javascript" src="js/mbiyao.js"></script> -->
		<script type="text/javascript" src="js/register/comment.js"></script>
		<script src="js/register/md5.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function() {
		//app头部改原生 传title  
		if(isinapp==1&&newApp==1){
			var jsonStr={"title":"免费注册"};
			MBase.toapp.appTitle(jsonStr);
		}else{
			$('.m_pagetop').removeClass('none');
		}
		//初始化参数
		var sendObj = {
				'mobile':'',
				'codeType':'',
				'remarkType':'register',
				'phoneExist':'-1',
				'cipId':cipher($.cookie('uuid')+'A780_aa#@zu*ZYx-g666')
			},
			k = geturipra("k")||'';
		//设定页面高度 => 页面高度异常须调查清楚
		setTimeout(function(){$('.waps').css('min-height', ($(window).height() - 80) + 'px');},800);
		//页面初始化样式
		$('.m_l_logo').css('display', 'block').addClass('animated lightSpeedIn');
		$(".m_zc_yh,.m_zc_vc").focus(function(){
			$(this).addClass('checkedinput');
		});
		//输入框获取焦点样式
		$(".m_zc_yh,.m_zc_vc").blur(function(){
			$(this).removeClass('checkedinput');
		});
		//是否同意必要协议
		$('.m_qx').click(function(){
			if($(this).hasClass('c_checked')){
				$(this).removeClass('c_checked');
			}else{
				$(this).addClass('c_checked');
			}
		});
		//显示隐藏密码
		$('.pwdview').click(function(){
			if($(this).val()=="显示密码"){
				$(this).val('隐藏密码');
				$('input[name="password"]').attr('type','text');
			}else{
				$(this).val('显示密码');
				$('input[name="password"]').attr('type','password');
			}
		});
		$('#zcxy').click(function(){
			try{
				sessionStorage.setItem("regit_mobile", $("input[name='username']").val());
			}catch(e){
				
			}
			window.location.href='/account/registmy';
		});
		$('.agree_xy').click(function(){
			$('.m_login_wreg').removeClass('none');
			$('.zcxy_con').addClass('none');
			if(!$('.m_qx').hasClass('c_checked')){
				$('.m_qx').addClass('c_checked');
			}
		});
		$('#m_goback').click(function(){
			setTimeout(function(){
				$('.m_login_wreg').removeClass('none');
				$('.zcxy_con').addClass('none');
			},100);
		});
		
		try{
			$("input[name='username']").val(sessionStorage.getItem("regit_mobile"));
		}catch(e){
			
		}
		
		//验证码计时
		if($('#m_mobile').html()!=''){
		 	var btnvc =$('.m_sendvc_b');
		 	var curm = 11;
		 	var time1 = setInterval(function(){
		 		if(curm>0){
		 			curm --;
		 			btnvc.val(curm+'秒后重发');
		 			curm==10&&$('.voice').show();
		 		}
		 		else
		 		{		 			
		 			btnvc.css('display','none');
		 			$('.m_sendvc_bre').css('display','inline');
		 			$('.m_sendvc_bre').val('重发验证码');
		 			btnvc.val('30秒后重发');
		 			clearInterval(time1)
		 			return false;	
		 		}
		 	}, 1000);
		}
					
		$(document).keydown(function(){
			var ev =window.event||e;
			if (ev.keyCode==13) {
				$('#sendvc').click();
			}
		});
		
		//发送验证码事件
		$('#sendvc').click(function(){
			//验证是否同意必要协议
			if(!$('.m_qx').hasClass('c_checked')){
				OurBox.alert('请同意必要服务协议',function(){},{width:'170'});
				return false;
			}
			//验证手机格式			
			sendObj.mobile =$("input[name='username']").val();
			sendObj.codeType ='verifyCode';
			if (sendObj.mobile=='') {
				OurBox.alert('请输入手机号',function(){},{width:'170'});
				return false;
			};
			var reg = /^0?1[3|4|5|7|8][0-9]\d{8}$/;
			if (!reg.test(sendObj.mobile)) {
				OurBox.alert('手机号格式有误，请重新输入',function(){},{width:'200'});
				return false;
			};
			$.ajax({
	            url:'/account/sendCode',
	            dataType: 'json',
	            type: 'POST',
	            data: sendObj,
	            success: function (data) {}
	        });
			 $.ajax({
		            url:'/account/doCheck',
		            dataType: 'json',
		            type: 'POST',
		            data: sendObj,
		            success: function (data) {
		            	var msg;
		            	if (data.success == 1) {
		            		k = data.data.k;
		            		sessionStorage.removeItem("regit_mobile");
		            		window.location.href='/account/registvc?mobile='+sendObj.mobile+'&k='+data.data.k; 
		    			} else {
		    				sessionStorage.removeItem("regit_mobile");
		    				if(data.data!=null && data.data.imgvcode != ''){
		    					var imgurl = data.data.imgvcode;
	    			        	var s_str = $.trim(data.data.s);
	    			        	setYzm(imgurl,s_str,function(data2){
	    			        		k = data.data.k;
	    			        		window.location.href='/account/registvc?mobile='+sendObj.mobile+'&k='+data2;
	    			        	});
		    				}
		    				
		    				switch (Number(data.error.code)){
		    					case 208101:
		    						var oCpcode = geturipra("corpcode");
				                	if(oCpcode&&oCpcode!=null&&oCpcode!=''){
				                		var oMobile =$("input[name='username']").val();
				                		window.location.href='/account/sfvipyz?mobile='+oMobile;
				                		return false;
				                	}
				                	OurBox.spconfirm('该手机号已注册,请直接登录！','直接登录','取消',function(){window.location.href='/account/login';},function(){},{width:'220'});
		    						break;
		    					default:
		    						OurBox.alert(data.error.message,function(){},{width:'170'});
		    				}
		                	return false;
		    			}
		            },
		            error: function () {
		            	OurBox.alert('网络连接失败，请稍后重试',function(){},{width:'170'});
		                return false;
		            }
		        });
		});
		// 重新发送验证码
		$('#revc').click(function(){
			sendObj.mobile = 15221744121;
			sendObj.codeType ='verifyCode';
			$.ajax({
	            url:'/account/sendCode',
	            dataType: 'json',
	            type: 'POST',
	            data: sendObj,
	            success: function (data) {}
	        });
			$.ajax({
	            url:'/account/doCheck',
	            dataType: 'json',
	            type: 'POST',
	            data: sendObj,
	            success: function (data) {
	            	var msg;
	            	if (data.success == 1) {
	            		settime();
	            		sessionStorage.removeItem("regit_mobile");
	    				k = data.data.k;
	    			} else {
	                	sessionStorage.removeItem("regit_mobile");
	                	if(data.data!=null && data.data.imgvcode != ''){
	    					var imgurl = data.data.imgvcode;
    			        	var s_str = $.trim(data.data.s);
    			        	setYzm(imgurl,s_str,function(){
    			        		settime();
    			        		//k = data.data.k;
    			        	});
	    				}else{
	    					OurBox.alert(data.error.message,function(){},{width:'170'});
	    				}
	    			}
	            },
	            error: function () {
	            	OurBox.alert('网络连接失败，请稍后重试',function(){},{width:'200'});
	                return;
	            }
	        });
		})
		//确认手机验证码
		$('#confirmvc').click(function(){
			var code =$("input[name='username']").val();
			if(code==""||code=="undefined"||code.length!=6){
				OurBox.alert('请输入6位短信验证码',function(){},{width:'170'});
				return false;
			}
			$.ajax({
	            url:'/account/validCode',
	            dataType: 'json',
	            type: 'POST',
	            data: {
            		'code':code,
            		'k':k       	
            	},
	            success: function (data) {
	            	if(data.success==1){
	            		if(data.data.ok==1){
	            			window.location.href='/account/registpwd?mobile='+data.data.phone+'&k='+data.data.k+'';
	            		}else {
	            			OurBox.alert(data.data.phone,function(){},{width:'200'});
	            		}
	            	}else{
	            		OurBox.alert('请求错误，请重新获取验证码！',function(){},{width:'200'});
	            	}               	                
	            },
	            error: function () {
	            	OurBox.alert('网络连接失败，请稍后重试',function(){},{width:'200'});
	            }
	        });
		})
		//设置企业用户注册cookie
		var corpcode=geturipra("corpcode");
		if(corpcode!=""){
			setCookie("corpcode",corpcode);	
			var yzHtml ='<a href="/account/sfvipyz" class="sf_vip_yz f60">已经是必要商城会员？点击验证</a>';
			$('#yzLink').append(yzHtml);
		}
		
		var cpcode = getCookie("corpcode");
		if(cpcode&&cpcode!=null&&cpcode!=''){
			$('.m_f_bottomre').addClass('none');
		}else{
			$('.m_goback').removeClass('none');
			// $('.m_menu').removeClass('none');
		}
		//TODO 设置验证码
		function setYzm(imgurl,s_str,fn){
    		if($(".yzm_bg").length == 0){
				var tc_c = '<div class="yzm_bg"></div>'+
	        	'<div class="yzm_con">'+
	        	'<div class="yzm_title">请输入图片验证码</div>'+
	        	'<div class="yzm_sr"><input type="text"class="yzm_text" maxlength="4" placeholder="请输入验证码" /><img class="yzm_img" id="yzm_img" src="" /></div>'+
	        	'<div class="yzm_btn"><span class="btn_cancle">取消</span><span class="btn_sure">确定</span></div>'+
	        	'</div>';
	        	
	        	$("body").append(tc_c);
			}else{
				$(".yzm_bg,.yzm_con").show();
				$(".yzm_text").val("");
			}
			
        	$("#yzm_img").attr("src",imgurl);
        	//点击切换验证码
        	$("#yzm_img").bind("click",function(){
        		$("#yzm_img").attr("src",imgurl);
        	});
        	
        	//点击关闭弹层
        	$(".yzm_bg,.btn_cancle").click(function(){
        		$(".yzm_bg,.yzm_con").hide();	
        	});
        	//点击确定
        	$(".btn_sure").unbind("click");
        	$(".btn_sure").bind("click",function(){
        		var i_val = $.trim($(".yzm_text").val());
        		if(i_val == ""){
        			OurBox.alert('请输入验证码',function(){},{width:'200'});
    				return false;
	        	}
        		var sendObj2 = {
    				'mobile':sendObj.mobile,
    				'codeType':sendObj.codeType,
    				'remarkType':sendObj.remarkType,
    				'phoneExist':sendObj.phoneExist,
    				's':s_str,
    				'imgvcode':i_val,
    				'cipId':sendObj.cipId
    			};
        		$.ajax({
    	            url:'/account/sendCode',
    	            dataType: 'json',
    	            type: 'POST',
    	            data: sendObj,
    	            success: function (data) {}
    	        });
        		$.ajax({
		            url:'/account/doCheck',
		            dataType: 'json',
		            type: 'POST',
		            data: sendObj2,
		            success: function (data) {
		            	if (data.success == 1) {
		            		sessionStorage.removeItem("regit_mobile");
		            		$(".yzm_bg,.yzm_con").hide();
		            		k = data.data.k;
		            		fn(k);
		    			} else {
		    				OurBox.alert(data.error.message,function(){},{width:'170'});
		    			}
		            },
		            error: function () {
		            	OurBox.alert('网络连接失败，请稍后重试',function(){},{width:'170'});
		                return false;
		            }
        		});
			});
    	}
		
		//提交注册
		$('#sub_zc').click(function(){
			var mobile = 15221744121;
			var password = $("input[name='password']").val();
			var usrUrl = '/account/newRegist';
			var regdata={
					"k":k,
					"password":encodeURIComponent(password),
					"username":mobile
        		}
			if(cpcode&&cpcode!=null&&cpcode!=''){
				 usrUrl = '/account/registerAjaxsf';
				 regdata={"mobile":mobile,
							"password":encodeURIComponent(password),
							"code":"null",
							"corpcode":cpcode
		        		}
			}
			if(!passwordT(password)){
				OurBox.alert('请输入6-32位密码<br/>数字、字母、符号两种以上组合',function(){},{width:'200',stays:'3000'});
				return false;
			}
			$.ajax({
	            url:''+ usrUrl,
	            dataType: 'json',
	            type: 'POST',
	            timeout : 8000, //超时时间设置，单位毫秒
	            data: regdata,
	            success: function (data) {	  
	            	if (data.success == 1) {
	            		var uid = getCookie('idcard');
                    	var token = getCookie('token');
                    	parent.$(window.parent.document).find("body").append('<iframe src="https://home.biyao.com/jump.php?mod=login&uid='+uid+'&token='+token+'" class="none"></iframe>');
	            		window.location.href='/account/registsucceed';	
	                }else{
	                	OurBox.alert(data.error.message,function(){},{width:'240'});
	                }                	
	            },
	            error: function () {
	            	OurBox.alert('注册失败，休息几分钟，再试一次',function(){},{width:'240'});
	                return;
	            },
	            beforeSend:function(){
	            	$('#sub_zcing').removeClass('none');
	            	$('#sub_zc').addClass('none');
	            },
	            complete:function(XMLHttpRequest, status){
	            	if(status=='timeout'){//超时,status还有success,error等值的情况
            	      ajaxTimeoutTest.abort();
            	      OurBox.alert('请求超时，休息几分钟，再试一次',function(){},{width:'240'});
                    }
	            	$('#sub_zc').removeClass('none');
	            	$('#sub_zcing').addClass('none');
	            }
	        });
			
		});
		
		$('#qgg').click(function(){
			if(parent.location.href.indexOf("#mmlogin")>-1){
        		formuserinfo();
        		return false;
			}else{
				window.location.href="/";
			}
		});
		//加载点击效果
		MBase.active.addactive();
		//发送语音验证码
		var voiced = false;
		$('.voice span').click(function(){
			if(voiced){
				OurBox.sSureBox('<div class="voiceBox"><p>提示</p>正在努力获取语音验证码，请稍后</div>',function(){},'<span class="voice-no">确定</span>',{width:'250'})
			}else {
				OurBox.SpConfirmBox('<div class="voiceBox"><p>使用语音验证码</p>语音验证码将以电话形式通知您，请注意接听。</div>','<span class="voice-no">拒绝</span>','<span class="voice-yes">同意</span>',
					function(){},
					function(){
						sendObj.mobile = 15221744121;
						sendObj.codeType ='voiceCode';
						$.ajax({
				            url:'/account/sendCode',
				            dataType: 'json',
				            type: 'POST',
				            data: sendObj,
				            success: function (data) {}
				        });
						$.ajax({
				            url:'/account/doCheck',
				            dataType: 'json',
				            type: 'POST',
				            data: sendObj,
				            success: function (data) {
				            	var msg;
				            	if (data.success == 1) {
				            		sessionStorage.removeItem("regit_mobile");
				    				k = data.data.k;
					            	voiced = true;
				    				var curm = 20;
				    			 	var time3 = setInterval(function(){
				    			 		if(curm>0){
				    			 			curm --;
				    			 		}else{	
				    			 			voiced = false;
				    			 			clearInterval(time3)
				    			 			return false;	
				    			 		}
				    			 	}, 1000);
				    			} else {
				    				sessionStorage.removeItem("regit_mobile");
				    				if(data.data!=null && data.data.imgvcode != ''){
				    					var imgurl = data.data.imgvcode;
			    			        	var s_str = $.trim(data.data.s);
			    			        	setYzm(imgurl,s_str,function(){
			    			        		//k = data.data.k;
							            	voiced = true;
						    				var curm = 20;
						    			 	var time3 = setInterval(function(){
						    			 		if(curm>0){
						    			 			curm --;
						    			 		}else{	
						    			 			voiced = false;
						    			 			clearInterval(time3)
						    			 			return false;	
						    			 		}
						    			 	}, 1000);
			    			        	});
				    				}else{
				    					OurBox.alert(data.error.message,function(){},{width:'170'});
				    				}
				    			}
				            },
				            error: function () {
				            	OurBox.alert('网络连接失败，请稍后重试',function(){},{width:'200'});
				                return;
				            }
				        });
					},{width:'250'}
				)
			}
		});
	})
	function settime(){			
		var btnvc =$('.m_sendvc_b');
	 	var curms = 30;
	 	$('.m_sendvc_bre').css('display','none');
		$('.m_sendvc_b').css('display','inline');
	 	var time2=setInterval(function(){
	 		if(curms>0){
	 			curms --;
	 			btnvc.val(curms+'秒后重发');
	 		}
	 		else
	 		{		 			
	 			btnvc.css('display','none');
	 			$('.m_sendvc_bre').css('display','inline');
	 			$('.m_sendvc_bre').val('重发验证码');
	 			btnvc.val('30秒后重发');
	 			clearInterval(time2)
	 			return false;	
	 		}
	 	}, 1000);
	}
	function passwordT(password){
		var number = /^[0-9]{6,32}$/,
			letter = /^[a-zA-Z]{6,32}$/,
			sign = /^[@!#$%&'\*\+\-\/=\?\^_`{\|}\[\]<>\(\)"~,\.:;\\]{6,32}$/,
			all=/^[0-9a-zA-Z@!#$%&'\*\+\-\/=\?\^_`{\|}\[\]<>\(\)"~,\.:;\\]{6,32}$/,
			china = /[\u4E00-\u9FA5]/;
     	if (number.test(password) || letter.test(password) || sign.test(password) || china.test(password) || !all.test(password)) {
         	return false;
     	}
     	return true;
	}
	function gotoorder(){		
		var data =null;
		$.ajax({
			type:"post",
			url:"/cart/prepareGotoOrder",
			dataType:"json",
			async:false,
			contentType:"application/x-www-form-urlencoded;charset=utf-8",
			data:data,
			success:function(data){
				if(data.success == 1){
					window.location.href='/orderSU/gotoorder';
				}else if(data.success == -1){
					var designIds = new Array();
					var i=0;
					while(i<data.cannotbuy.length){
						designIds[i] = data.cannotbuy[i].designId;
						i++;
					}
					OurBox.alert('商品库存不足',function(){},{width:'170'});
					window.location.href='/cart/list.html';					
				}else if(data.success == -2){
					data.nextDate;
					OurBox.alert('部分限量商品已被抢光',function(){},{width:'170'});
					window.location.href='/cart/list.html';
				}else{
					OurBox.alert('结算失败,请稍后重试',function(){},{width:'170'});
					window.location.href='/cart/list.html';
				}
			},
			error:function(data)
			{
				OurBox.alert('网络连接失败，请稍候重试',function(){},{width:'170'});
			}
		});
	}
	
	
	var formuserinfo=function(){
		if(parent.location.href.indexOf("cart/list.html")>-1){
			parent.$(window.parent.document).find(".m_sub_btn").click();
		}
		var nikename=getCookie('userinfo');
		nikename = nikename.split(',')[0];			
		parent.$(window.parent.document).find(".m_f_top").html('<span class="f_l pad_5 col_666">'+nikename+'</span><span class="f_l col_666 pad_m_5">&nbsp;丨&nbsp;</span><a class="touri f_l pad_5 col_666" touri="/account/logout">退出</a><input type="hidden" id="islogin" value="true"><a class="f_r col_666 pointer pad_5 totop"><span>回到顶部</span></a>');
		parent.$(window.parent.document).find(".s_login_ts").remove();
		var huri=parent.location.href.substring(0,parent.location.href.indexOf('#'));
		parent.history.pushState({},'',huri);
		parent.$(window.parent.document).find('#by_w').removeClass('none_im');
		parent.$(window.parent.document).find('.tap_bg').remove();
	}
	//获取地址栏参数
	function geturipra(praname){
		var reg = new RegExp("(^|&)" + praname + "=([^&]*)(&|$)", "i");
		var r = window.location.search.substr(1).match(reg);
		if (r != null) return unescape(r[2]); return "";
	};
</script>
</div>
	<script type="text/javascript" src="js/bytrack.js"></script><img style="display:none;" src="images/by.gif">



</body></html>